package com.ruoyi.monitor.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.monitor.mapper.MonitorDeviceMapper;
import com.ruoyi.monitor.domain.MonitorDevice;
import com.ruoyi.monitor.service.IMonitorDeviceService;

/**
 * 监控设备Service业务层处理
 * 
 * @author lh
 * @date 2025-04-16
 */
@Service
public class MonitorDeviceServiceImpl implements IMonitorDeviceService 
{
    @Autowired
    private MonitorDeviceMapper monitorDeviceMapper;

    /**
     * 查询监控设备
     * 
     * @param deviceId 监控设备主键
     * @return 监控设备
     */
    @Override
    public MonitorDevice selectMonitorDeviceByDeviceId(Integer deviceId)
    {
        return monitorDeviceMapper.selectMonitorDeviceByDeviceId(deviceId);
    }

    /**
     * 查询监控设备列表
     * 
     * @param monitorDevice 监控设备
     * @return 监控设备
     */
    @Override
    public List<MonitorDevice> selectMonitorDeviceList(MonitorDevice monitorDevice)
    {
        return monitorDeviceMapper.selectMonitorDeviceList(monitorDevice);
    }

    /**
     * 新增监控设备
     * 
     * @param monitorDevice 监控设备
     * @return 结果
     */
    @Override
    public int insertMonitorDevice(MonitorDevice monitorDevice)
    {
        return monitorDeviceMapper.insertMonitorDevice(monitorDevice);
    }

    /**
     * 修改监控设备
     * 
     * @param monitorDevice 监控设备
     * @return 结果
     */
    @Override
    public int updateMonitorDevice(MonitorDevice monitorDevice)
    {
        return monitorDeviceMapper.updateMonitorDevice(monitorDevice);
    }

    /**
     * 批量删除监控设备
     * 
     * @param deviceIds 需要删除的监控设备主键
     * @return 结果
     */
    @Override
    public int deleteMonitorDeviceByDeviceIds(Integer[] deviceIds)
    {
        return monitorDeviceMapper.deleteMonitorDeviceByDeviceIds(deviceIds);
    }

    /**
     * 删除监控设备信息
     * 
     * @param deviceId 监控设备主键
     * @return 结果
     */
    @Override
    public int deleteMonitorDeviceByDeviceId(Integer deviceId)
    {
        return monitorDeviceMapper.deleteMonitorDeviceByDeviceId(deviceId);
    }
}
